<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>按钮</title>
    <link href="../../../css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
        <button type="button" class="btn btn-primary js-loading-btn" data-loading-text="Loading for 3seconds">Loading state</button>
        <button type="button" class="btn btn-default "data-toggle="button"autocomplet="off">hello</button>
        <div class="btn-group"data-toggle="buttons">
            <label class="btn btn-primary active">
                <input type="checkbox" autocomplete="off" checked>选择一
            </label>
            <label class="btn btn-primary ">
                <input type="checkbox" autocomplete="off" >选择二
            </label>
            <label class="btn btn-primary ">
                <input type="checkbox" autocomplete="off" >选择三
            </label>
        </div>
        <div class="btn-group"data-toggle="buttons">
            <label class="btn btn-primary active">
                <input type="radio" name="options" autocomplete="off" >单选一
            </label>
            <label class="btn btn-primary ">
                <input type="radio" name="options" autocomplete="off" >单选二
            </label>
            <label class="btn btn-primary ">
                <input type="radio" name="options" autocomplete="off" >单选三
            </label>

        </div>


</div>
<script src="../../../js/jquery-2.1.1.js"></script>
<script src="../../../js/bootstrap.js"></script>
<script>
    $(".js-loading-btn").on("click",function(e){
        var btn=$(this).button("loading");
        setTimeout(function(e){
            btn.button("reset")
        },3000)
    })
</script>
</body>
</html>